home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / tcoop10a.zip / DOC.ZIP / MOUSE.DOC < prev    next >
Text File  |  1991-11-20  |  6KB  |  127 lines

  1. MOUSE.DOC       11/15/91        Copyright (c) 1991 by James S. Clark
  2. ==========================================================================
  3. MOUSE
  4. Mouse Class
  5. --------------------------------------------------------------------------
  6. Class Name                      Mouse
  7. Superclass                      <none>
  8. Category                        Device
  9. Other classes referenced        <none>
  10. Other catagories referenced     <none>
  11. Used by                         Event
  12. Inherited by                    <none>
  13.  
  14. Declaration                     Mouse   *mouse
  15.  
  16. Instance Variables
  17.                                 int  active;
  18. Instance Methods
  19.                                 Mouse   ();
  20.                                 ~Mouse  ();
  21.                                 void    buttoninfo (int , int *, int *,
  22.                                                           int *, int *);
  23.                                 void    buttonpress(int , int *, int *,
  24.                                                           int *, int *);
  25.                                 void    buttonrel  (int , int *, int *,
  26.                                                           int *, int *);
  27.                                 int     getstate   (int *, int *);
  28.                                 void    graphcursor(int , int , int []);
  29.                                 void    hide       ();
  30.                                 void    motion     (int *, int *);
  31.                                 void    moveto     (int , int );
  32.                                 void    protect    (int , int , int , int );
  33.                                 void    ratio      (int , int );
  34.                                 void    reset      ();
  35.                                 void    setxrange  (int , int );
  36.                                 void    setyrange  (int , int );
  37.                                 void    show       ();
  38.                                 void    textcursor (int , unsigned ,
  39.                                                           unsigned );
  40.                                 void    threshold  (int );
  41.                                 void    usertask   (unsigned , function );
  42. --------------------------------------------------------------------------
  43. GENERAL DESCRIPTION
  44.  
  45. The Mouse Class provides a means for communicating with a Microsoft Mouse
  46. driver, or its equivalent.  Methods are provided for displaying, hiding,
  47. moving, and checking the botton status of the mouse.
  48.  
  49. --------------------------------------------------------------------------
  50. VARIABLES
  51.  
  52. int     active;
  53.         If the mouse driver is activated this value will be 1, otherwise
  54.         it will be 0.
  55.  
  56. --------------------------------------------------------------------------
  57. METHODS
  58.  
  59. void    buttoninfo (int button, int *status, int *count, int *x, int *y);
  60.  
  61. void    buttonpress(int button, int *status, int *count, int *x, int *y);
  62.         Returns with the status and number of times that a selected button
  63.         has been pressed.  (button 0=left, 1=right)
  64.  
  65. void    buttonrel  (int button, int *status, int *count, int *x, int *y);
  66.         Returns with the status and number of times that a selected button
  67.         has been released.  (button 0=left, 1=right)
  68.  
  69. int     getstate   (int *x, int *y);
  70.         Returns with the mouse state.  x and y are also passed and altered
  71.         by the call.
  72.  
  73. void    graphcursor(int h_hot, int v_hot, int data[]);
  74.         Defines a new graphics cursor.  The hot spot is given along with
  75.         an array of 32 bytes.  The array contains 16 bytes for the image
  76.         and another 16 for the mask.
  77.  
  78. void    hide       ();
  79.         Decrements the cursor counter and if the count <1, hides cursor.
  80.  
  81. void    motion     (int *dx, int *dy);
  82.         Returns with the amount of mouse movement that has occured since
  83.         the last check.  Positive values are down and to the right.
  84.  
  85. void    moveto     (int x, int y);
  86.         Moves the cursor to the specified coordinates.
  87.  
  88. void    protect    (int x1, int y1, int x2, int y2);
  89.         Protects an area on the screen from the mouse so drawing can
  90.         take place without turning off the cursor.  The cursor will
  91.         disappear only in the prtected area.  Call show() to clear it.
  92.  
  93. void    ratio      (int rx, int ry);
  94.         Sets the mickeys-to-pixel ratio.  The default is 8 mickeys
  95.         horizontally and 16 mickeys vertically.
  96.  
  97. void    reset      ();
  98.         Determines if the mouse is installed and resets the defaults.
  99.  
  100. void    setxrange  (int min, int max);
  101.         Sets the horizontal limits for mouse movement on the screen.
  102.  
  103. void    setyrange  (int min, int max);
  104.         Sets the vertical limits for mouse movement on the screen.
  105.  
  106. void    show       ();
  107.         Increments the cursor counter and if >0 displays cursor.
  108.  
  109. void    textcursor (int type , unsigned p1, unsigned p2);
  110.         Selects hardware or software text cursor.  Select the type:
  111.         Software (1) sets the screen and cursor masks.
  112.         Hardware (2) sets the cursor start and stop scan lines.
  113.  
  114. void    threshold  (int dx);
  115.         Sets the double speed threshold.  The speed is in mickeys-per-
  116.         second.  The default is 16.
  117.  
  118. void    usertask   (unsigned mask, function eventhandler);
  119.         Allows you to specify a function within your program that can be
  120.         evoked whenever a mouse event occurs.  The mask controls the
  121.         type of events that will trigger the handler.  Bits 1-2 are for
  122.         button presses, bits 3-4 are for button releases.
  123.  
  124. --------------------------------------------------------------------------
  125. MOUSE.DOC                       Copyright (c) 1991 by James S. Clark
  126. ==========================================================================
  127.